﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL_V1.App_Code.DBBroker;
using EntityObjects;

namespace BAL.Controller
{
    public class ViewDisbursementListControl
    {
        DisbursementDBBroker disbursementRef;
        EmployeeDBBroker empRef;

        public ViewDisbursementListControl()
        {
            disbursementRef = DisbursementDBBroker.getDisbursementDBBroker();
            empRef = EmployeeDBBroker.getEmployeeDBBroker();
        }

        public List<DisbursementCatalogue> getDisbursementListForDept(String deptId)
        {
            List<DisbursementCatalogue> disbursement_list = new List<DisbursementCatalogue>();
            disbursement_list = disbursementRef.getDisbursementListForDept(deptId);
            return disbursement_list;
        }


        public String getDeptId(String empId)
        {
            Employee e = empRef.selectEmployee(empId);
            return e.DeptId;
        }
    }
}
